Path: api/v1/quotes/{quoteno}/stock
This API is JSON:API compliant.
This endpoint supports the following methods:
GET POST PATCH DELETE
This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.
The resource type for this endpoint is QuoteStock
The identifier is quoteno-lineid
Relationships
A relationship links this QuoteStock to another resource. By default only the related resource's type and id are returned. Relationships marked Includable can be embedded in the response via the include query parameter (see Includes below). To set or change a relationship, send a resource identifier (type and id) for it. Postable means the relationship can be set when creating the resource (POST); Patchable means it can be changed when updating an existing resource (PATCH). Some relationships are Postable but not Patchable — they can be set at creation but not changed afterwards. A value sent for a relationship that is not Postable/Patchable in that context is not applied.
| Relationship | Type | Returns | Includable | Postable | Patchable |
|---|---|---|---|---|---|
| stock | QuoteStock | array | ✗ | ✗ | ✗ |
Attributes
The QuoteStock resource type attributes are as follows:
| Attribute | Type | Read-only | Description |
|---|---|---|---|
| adddate | string (DateTime in ISO format) | ✓ | The date and time the stock line was added. |
| addinit | string | ✓ | The initials of the user who added the stock line. |
| configNo | integer | ✓ | Stock attribute configuration number. |
| description | string | The stock description. Only required if the default stock description needs to be overrridden. It is recommended this be set for special stock. | |
| modifydate | string (DateTime in ISO format) | ✓ | The date and time the stock line was last modified. |
| modifyinit | string | ✓ | The initials of the user who last modified the stock line. |
| qty | number | The quantity ordered. Notes Updating the Qty does NOT trigger a price recalculation using Jim2's pricing. If the caller needs to have Jim2 recalculate the price the stock line will have to be deleted and re-added. When adding a stock post (POST), Jim2 will calculate pricing if no pricing is provided as part of the request |
|
| stockCode | string | ✓ | The Jim2 stock code |
| stockId | integer | ✓ | The Jim2 stock number of the line's stock item. |
| unit | string | ✓ | The unit of measure for the stock line. |
| unitPrice | number | The unit price. If Quote is calculating prices from tax paid amounts this will be tax inclusive, otherwise this will be tax exclusive. It is highly recommended to set only one of unitPrice, unitPriceTF, or unitPriceTP - if multiple are set the last one processed wins. |
|
| unitPriceTF | number | The unit price exlusive of tax. Note that if Quote is calculating prices from tax paid amounts the actual price set may differ due to rounding. It is highly recommended to set only one of unitPrice, unitPriceTF, or unitPriceTP - if multiple are set the last one processed wins. |
|
| unitPriceTP | number | The unit price inclusive of tax. Note that if Quote is calculating prices from tax exclusive amounts the actual price set may differ due to rounding. It is highly recommended to set only one of unitPrice, unitPriceTF, or unitPriceTP - if multiple are set the last one processed wins. |
Path: api/v1/quotes/10/stock Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response. This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above). Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.
Example GET (Return all)
{
"data": [
{
"id": "10-1",
"type": "QuoteStock",
"attributes": {
"qty": 1.0,
"unitPrice": 1650.00,
"unitPriceTF": 1500.00,
"unitPriceTP": 1650.00,
"configNo": 812,
"addinit": "SYS",
"adddate": "2024-06-24T14:04:00",
"stockId": 7,
"stockCode": "MULTILEVEL.MANF",
"unit": "EACH",
"description": "Multilevel Manufacture",
"modifyinit": "SYS",
"modifydate": "2024-06-24T14:04:19"
},
"relationships": {
"stock": {
"data": {
"type": "QuoteStock",
"id": "7"
}
}
}
},
{
"id": "10-2",
"type": "QuoteStock",
"attributes": {
"stockCode": "SAMSUNG.MON.27",
"description": "27\" QLED Samsung Monitor"
}
},
{
"id": "10-3",
"type": "QuoteStock",
"attributes": {
"stockCode": "SAMSUNG.MON.27",
"description": "27\" QLED Samsung Monitor"
}
}
]
}
Path: api/v1/quotes/10/stock/10-1 Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.
Example GET (Return specific)
{
"data": {
"id": "10-1",
"type": "QuoteStock",
"attributes": {
"qty": 1.0,
"unitPrice": 1650.00,
"unitPriceTF": 1500.00,
"unitPriceTP": 1650.00,
"configNo": 812,
"addinit": "SYS",
"adddate": "2024-06-24T14:04:00",
"stockId": 7,
"stockCode": "MULTILEVEL.MANF",
"unit": "EACH",
"description": "Multilevel Manufacture",
"modifyinit": "SYS",
"modifydate": "2024-06-24T14:04:19"
},
"relationships": {
"stock": {
"data": {
"type": "QuoteStock",
"id": "7"
}
}
},
"links": {
"self": "/api/v1/quotes/10/stock/10-1"
}
}
}
Path: api/v1/quotes/10/stock Request: Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.
Example POST
{
"data":
{
"type": "QuoteStock",
"attributes":
{
"stockCode": "MOUSE",
"qty": 2.0,
"description": "Updated stock line description",
"unitPriceTF": 120.00
}
}
}
{
"data": {
"id": "10-4",
"type": "QuoteStock",
"attributes": {
"qty": 2.0,
"unitPrice": 49.50,
"unitPriceTF": 45.00,
"unitPriceTP": 49.50,
"configNo": 815,
"addinit": "API",
"adddate": "2025-03-25T18:28:28.899892+11:00",
"stockId": 5,
"stockCode": "MOUSE",
"unit": "EACH",
"description": "Mouse",
"modifyinit": "API",
"modifydate": "2025-03-25T18:28:28.899892+11:00"
},
"relationships": {
"stock": {
"data": {
"type": "QuoteStock",
"id": "5"
}
}
},
"links": {
"self": "/api/v1/quotes/10/stock/10-4"
}
}
}
Path: api/v1/quotes/10/stock/10-1 Request: Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.
Example PATCH
{
"data":
{
"id": "10-1",
"type": "QuoteStock",
"attributes":
{
"qty": 2.0,
"description": "Updated stock line description",
"unitPriceTF": 120.00
}
}
}
{
"data": {
"id": "10-1",
"type": "QuoteStock",
"attributes": {
"qty": 2.0,
"unitPrice": 660.00,
"unitPriceTF": 600.00,
"unitPriceTP": 660.00,
"configNo": 813,
"addinit": "SYS",
"adddate": "2024-08-23T11:43:00",
"stockId": 1,
"stockCode": "SAMSUNG.MON.27",
"unit": "EACH",
"description": "27\" QLED Samsung Monitor",
"modifyinit": "API",
"modifydate": "2025-03-25T18:26:16.8189395+11:00"
},
"relationships": {
"stock": {
"data": {
"type": "QuoteStock",
"id": "1"
}
}
},
"links": {
"self": "/api/v1/quotes/10/stock/10-1"
}
}
}